EMT Practice Test

1. Question Content...


Question List

Question1: The following SAS program is submitted:
Data sasuser.history;
Set sasuser.history(keep=state x y
Rename = (state=ST));
Total=sum(x, y);
Run;
The SAS data set SASUSER.HISTORY has an index on the variable STATE.
Which describes the result of submitting the SAS program?

Question2: Given the following SAS program:
proc sql;
select product, type, sum(sales) as revenue
from one
group by product, type;
quit;
Which one of the following clauses should be added to the program to sort the output by PRODUCT and decreasing REVENUE?

Question3: Which one of the following techniques concatenates data in SAS?

Question4: Which one of the following statements about compressed SAS data sets is always true?

Question5: The following SAS program is submitted:
data new(bufsize = 6144 bufno = 4);
set old;
run;
What is the difference between the usage of BUFFSIZE= and BUFNO= options?

Question6: Which one of the following automatic SAS macro variables contains the return code from a previously executed step?

Question7: The following SAS program is submitted:
% let product = merchandise;
And the following message is written to the SAS log:
The value is "merchandise"
Which macro statement wrote this message?

Question8: In which one of the following SAS programs is the SAS data set index named CHAR1 always used?

Question9: Given the following SAS data set ONE:
ONE
GROUP SUM
A 765
B 123
C 564
The following SAS program is submitted:
data _null_;
set one;
call symput(group,sum);
run;
Which one of the following is the result when the program finishes execution?

Question10: Which one of the following statements is true?

Question11: Which one of the following options controls the pagesize of a SAS data set?

Question12: The SAS data set ONE consists of five million observations and has 25 variables.
Which one of the following SAS programs successfully creates three new variables TOTREV, TOTCOST, and PROFIT and requires the least CPU time to be processed?

Question13: The following SAS program is submitted:
data temp;
length 1 b 3 x;
infile 'file reference';
input a b x;
run;
What is the result?

Question14: Which SAS procedure changes the name of a permanent format for a variable stored in a SAS data set?

Question15: The following SAS program is submitted:

What is written to the SAS log?

Question16: Given the non-indexed SAS data set TEMP:
TEMP
X Y
P 52
P 45
A 13
A 56
R 34
R 12
R 78
The following SAS program is submitted:
Proc print data=temp;
<insert By statement here?
Run;
Which by statement completes the program, create a listing report that is grouped by X and completes without errors?

Question17: The following SAS program is submitted:
<insert statement here>;
% let development = ontime;
proc print data = sasuser.highway;
title "For &dept";
title2 "This project was completed &development";
run;
Which one of the following statements completes the above and resolves title1 to "For research&development"?

Question18: Given the SAS data sets:

The following SAS program is submitted:

What output is produced?

Question19: The DICTIONARY.MACROS table stores information about which of the following?

Question20: This question will ask you to provide a segment of missing code.
Given the SAS data set SASUSER.ORDERS:

The following SAS program is submitted:

Which statement completes the program completely so that it will produce a report with the total number of orders for California?

Question21: The following SAS program is submitted:
data temp;
array points{3,2}_temporary_ (10,20,30,40,50,60);
score = points{2,1}
run;
Which one of the following is the value of the variable SCORE in the data set TEMP?

Question22: The following SAS program is submitted:
data two;
y = '2';
run;
% let x = 10;
% let var = y;
data one;
set two (keep = &var);
z = &var * &x;
run;
Which one of the following is the value of the variable Z when the program finishes execution?

Question23: The following SAS program is submitted:
% let a=cat;
% macro animal(a=frog);
% let a=bird;
% mend;
% animal(a=pig)
% put a is &a;
What is written to the SAS log?

Question24: The following SAS program is submitted:
proc datasets lib = testdata;
modify one;
label num = 'Number';
format num 4.;
quit;
Which one of the following SQL programs produces the same results as the above DATASETS procedure?

Question25: Given the data sets:

The following SAS program is submitted:

Which result set would be generated?

Question26: The following SAS program is submitted:
proc sql;
select *
from dictionary.tables;
quit;
Which one of the following is reported?

Question27: Given the following SAS data sets ONE and TWO:
ONE TWO
NUM CHAR1 NUM CHAR2
1 A1 2 X1
1 A2 2 X2
2 B1 3 Y
2 B2 5 V
4 D
The following SAS program is submitted creating the output table THREE:
proc sql;
create table three as
select one.num, char1, char2
from one, two
where one.num = two.num;
quit;
THREE
NUM CHAR1 CHAR2
2 B1 X1
2 B1 X2
2 B2 X1
2 B2 X2
Which one of the following DATA step programs creates an equivalent SAS data set THREE?

Question28: Given the following partial SAS log:

Which SQL procedure statement generated this output?

Question29: This question will ask you to provide missing option.

Which option is required to complete the program correctly?

Question30: The following SAS program is submitted:
%let var = chicago, 1;
data a;
var = 'new york, 2';
newvar = %scan(&var,2,%str());
run;
Which one of the following explains why the program fails to execute?

Question31: The variable attributes of SAS data sets ONE and TWO are shown below:
ONE TWO
# Variable Type Len Pos # Variable Type Len Pos
2 sales Num 8 8 2 budget Num 8 8
1 year Num 8 0 3 sales Char 8 16
1 year Num 8 0
Data set ONE contains 100 observations. Data set TWO contains 50 observations. Both data sets are sorted by the variable YEAR.
The following SAS program is submitted:
data three;
merge one two;
by year;
run;
Which one of the following is the result of the program execution?

Question32: The following SAS program is submitted:
data temp;
array points{2,3} (10,15,20,25,30,35);
run;
What impact does the ARRAY statement have in the Program Data Vector(PDV)?

Question33: Given the following SAS data sets ONE and TWO:
ONE TWO
OBS COMMON X OBS COMMON Y
1 A 10 1 A 1
2 A 13 2 A 3
3 A 14 3 B 4
4 B 9 4 B 2
5 C 8 5 C 5
6 C 14
The following SAS DATA step is submitted:
data combine;
merge one two;
by common;
run;
Which one of the following represents the data values stored in data set COMBINE?

Question34: The question will ask you to provide a segment of missing code.
Given the following SAS program:

Which segment of code completes the program to use finance.new SAS view?

Question35: Given the SAS data set WORK TRANSACT:

The following output is desired:

Which SQL statement was used?

Question36: The following are values of the variable STYLE from the SAS data set
SASUSER.HOUSES:
SASUSERS.HOUSES
OBS STYLE
1 RANCH
2 SPLIT
3 CONDO
4 TWOSTORY
5 RANCH
6 SPLIT
7 SPLIT
The following SAS program is submitted:
proc sql noprint;
select distinct style
into :styles separated by ' '
from sasuser.houses
order by style;
quit;
Which one of the following is the value of the resulting macro variable?

Question37: The following SAS program is submitted:
% macro one (input);
% two;
% put the value is &date;
% mend;
% macro two;
data _null_;
call symput('date','12SEP2008');
run;
% mend;
% let date=31DEC2006;
% one(&date)
What is the result when the %PUT statement executes?

Question38: The SAS data set WORK.TEMPDATA contains the variables FMTNAME, START and LABEL and it consists of 10 observations.
The following SAS program is submitted:
Proc format cntlin=wor.tempdata;
Run;
What is the result of submitting the FORMAT procedure step?

Question39: Given the following SAS data set ONE:
ONE
LEVEL AGE
1 10
2 20
3 20
2 10
1 10
2 30
3 10
2 20
3 30
1 10
The following SAS program is submitted:
proc sql;
select level, max(age) as MAX
from one
group by level
having max(age) > (select avg(age) from one);
quit;
Which one of the following reports is generated?

Question40: Given the SAS data sets shown on the left, the SAS program on the right is submitted.

What will be the result when this program is executed?

Question41: Given the SAS dataset ONE
ONE
SALARY
200
205
523
The following SAS program is submitted
Proc sql;
Select * from one
<Insert Where expression here>;
quit;
The following output is desired:
SALARY
200
205
523
Which WHERE expression completes the program and generates the desired output?

Question42: The following SAS program is submitted:

The report will not successfully run and will produce an error message in the log. What causes the error message in the log?

Question43: Given the data set SASHELP.CLASS:
SASHELP.CLASS
NAME AGE
Mary 15
Philip 16
Robert 12
Ronald 15
The following SAS program is submitted:
% let value = Philip;
proc print data = sashelp.class;
<insert WHERE statement here>
run;
Which WHERE statement successfully completes the program and procedures a report?

Question44: Given the data set SASHELP.CLASS:

The following SAS program is submitted:

The PROC steps execute successfully?

Question45: The following SAS program is submitted:
data temp;
array points{2,3}_temporary_;
run;
Which one of the following is the maximum number of elements that are stored?

Question46: Given the data set shown in the left, the SAS program on the right is submitted.

Which program will result in the identical report?

Question47: The SAS data set WORK.TEMP is indexed on variable Id:

The following SAS program is submitted:

Question48: What is generated as a result of submitting the RANUNI function with a seed of 123?

Question49: The following SAS program is submitted:
options reuse=YES;
data sasuser RealEstate(compress=CHAR);
set sasuser houses;
run;
What is the effect of the REUSE=YES SAS system option?

Question50: The following SAS program is submitted:
% let value=9;
% let add=5;
% let newval=%eval(&value/&add);
What is the value of the macro variable NEWVAL?

Question51: The following SAS program is submitted:
data temp;
set sasuser.history(kep=date);
format date qtr
<insert BY statement here>
if first.date then total=0;
total+1;
if last.date;
run;
proc print data=temp;
run
SASUSER.HISTORY is sorted by the SAS date variable DATE.
The following output is required:
Date Total
1 13
3 15
4 25
Which By statement completes the data step and successfully generates the required output?

Question52: This question will ask you to provide a segment of missing code.
Given the following program and data:

What is the WHERE statement that successfully completes the PROC PRINT and selects the observation from Barb?

Question53: Text is sent to the SAS compiler as a result of macro execution. Which one of the following SAS system options writes that text to the log?

Question54: Given the SAS data set SAUSER.HIGWAY:
SASUSER.HIGHWAY

The following SAS program is submitted:
%macro highway;
proc sql nonprint;
%let numgrp=6;
select distinct status into:group1-:group&numgrp from sasuser.highway;
quit;
%do i=1 %to &numgrp;
proc print data =sasuser.highway;
where status ="&&group&I";
run;
% end;
% mend;
% highway
How many reports are produced?

Question55: The following SAS program is submitted:
% macro loop;
data one;
% do I=1 %to 3;
var&I=&I;%
end
run;
% mend;
% loop
After this program executes; the following is written to the SAS log:
(LOOP): Beginning execution
(LOOP): %DO loop beginning; index variable l; start value is 1; stop value is 3; by value is 1 (LOOP): %DO loop index variable l is now 2; loop will iterate again
(LOOP): %DO loop index variable l is no 3; loop will iterate again
(LOOP): %DO loop index variable l is no 4; loop will iterate again
(LOOP): Ending execution
Which SAS system option displays the notes in the SAS log?

Question56: The SAS set WORK CHECK has an index on the variable Code and the following SAS program is submitted.
proc sort data=WORK.CHECK;
by Code;
run;
What describes the result of submitting SAS program?

Question57: The following SAS ARRAY statement is submitted:
array score{*} a4 - a10, a25 ;
Which one of the following is the maximum number of elements stored?

Question58: Given the two output sets shown on the left, which program produced the output shown on the right?

Question59: Given the SAS date sets CLASS1 and CLASS2
CLASS1 CLASS2
NAME COURSE NAME COURSE
Lauren MATH1 Smith MATH2
Patel MATH1 Farmer MATH2
Chang MATH1 Patel MATH2
Chang MATH3 Hiller MATH2
The following SAS program is submitted:
Proc sql;
Select name from CLASS1
<insert SQL set operator here>
select name from CLASS;
quit;
The following output is desired
NAME
Chang
Chang
Lauren
Which SQL set operator completes the program and generates the desired output?

Question60: Which one of the following SAS programs uses the most amount of memory resources for output buffers?

Question61: Which one of the following is an advantage of creating and using a SAS DATA step view?

Question62: Given the unsorted data set WORK.ORDERS

The following three programs are submitted:

Which program will create a list of unique Customer_ID values in the WORK.ORDERS data set?

Question63: The SAS data set ONE contains the variables X, Y, Z, and W.
The following SAS program is submitted:
proc transpose data = one
out = trans
name = new;
by x;
var y;
run;
Which one of the following contains all the names of the columns created by the TRANSPOSE procedure?

Question64: The following SAS program is submitted:
% let a = cat;
% macro animal(a = frog);
% let a = bird;
% mend;
% animal(a = pig)
% put a is &a;
Which one of the following is written to the SAS log?

Question65: Given the SAS data set ONE:
ONE
NUM VAR
1 A
2 B
3 C
Which SQL procedure program deletes the data set ONE?

Question66: SIMULATION
This question will ask you to provide a segment of missing code.
Given the two data sets on the left, the SAS program on the right is submitted.


In the text box in the program above, complete the program so that it will properly use the macro variable to select the corresponding cities.
Case is ignored and standard SAS syntax rules apply.

Question67: The following SAS program is submitted:
options mprint;
%macro test(parm);
proc &parm data = sashelp.prdsale;
run;
%mend;
%test(print)
What is the result of the MPRINT options?

Question68: The following SAS program is submitted:
data one;
do i = 1 to 10;
ptobs = ceil(ranuni(0) * totobs);
set temp point = ptobs
nobs = totobs;
output;
end;
stop;
run;
The SAS data set TEMP contains 2,500,000 observations. Which one of the following represents the possible values for PTOBS?

Question69: Given the following SAS data set ONE:
ONE
COUNTRY CITY VISIT
USA BOSTON 10
UK LONDON 5
USA DALLAS 10
UK MARLOW 10
USA BOSTON 20
UK LONDON 15
USA DALLAS 10
The following SAS program is submitted:
proc sql;
select country, city, sum(visit) as TOTAL
from one
group by country, city
order by country, total desc;
quit;
Which one of the following reports is generated?

Question70: The following SAS program is submitted:
data new (bufsize = 6144 bufno = 4);
set old;
run;
Which one of the following describes the difference between the usage of BUFSIZE= and BUFNO= options?

Question71: This question will ask you to provide a missing reference.
Given the SAS data set SASUSER HIGHWAY:

The following SAS program is submitted:

What macro variable reference completes the program to create the WORK.NOT and WORK SERIOUS data sets?

Question72: The following SAS program is submitted:
date view=sauser.ranch;
describe;
run;
What is the result?

Question73: Given the data set SASHELP.CLASS
SASHELP.CLASS
NAME AGE
Mary 15
Philip 16
Robert 12
Ronald 15
The following SAS program is submitted
% let value = Philip;
proc print data =sashelp.class;
<insert Where statement here>
run;
Which WHERE statement successfully completes the program and produces a report?

Question74: The following SAS program is submitted:
% micro test(var);
% let jobs=BLACKSMITH WORDSMITH SWORDSMITH;
% let type=%index(&jobs, &var);
% put type = &type;
% mend;
% test(SMITH)
What is the value of the macro variable TYPE when the %PUT statement executes?

Question75: Following SAS program is submitted:
data temp(<insert option here>);
infile 'rawdata';
input x $ y z;
run;
RAWDATA is a file reference to an external file that is ordered by the variable X.
Which option specifies how the data in the SAS data set TEMP will be sorted?

Question76: A data set stored on a network drive has the following characteristics:
14 Million observations

400 numeric variables

0 character variables of length 20

Binary compression

A DATA Step query requires only 3 character and 15 numeric variables from this data set. What is the best way to reduce computer resource utilization in this DATA Step?

Question77: Given the following SAS data sets ONE and TWO:
ONE TWO
NUM CHAR1 NUM CHAR2
1 A 2 X
2 B 3 Y
4 D 5 V
The following SAS program is submitted creating the output table THREE:
data three;
set one two;
run;
THREE
NUM CHAR1 CHAR2
1 A
2 B
4 D
2 X
3 Y
5 V
Which one of the following SQL programs creates an equivalent SAS data set THREE?

Question78: Given the SAS data set WORK.ONE:

The following SAS program is submitted;

Which result set would be generated?

Question79: The following SAS program is submitted:
% let test=one;
% let one=two;
% let two=three;
% let three=last;
% put what displays is &&&&&test;
What is the written to the SAS log?

Question80: The following SAS program is submitted:
proc contents data = testdata.one;
run;
Which one of the following SQL statements produces similar information about the column attributes as the above CONTENTS procedure?

Question81: Which one of the following displays the definition of a stored SQL procedure view in the SAS log?

Question82: Which macro statement would remove the macro variable mv_Info from the symbol table?

Question83: Which one of the following programs contains a syntax error?

Question84: The following SAS program is submitted:

How will the variable be listed?

Question85: Which title statement would always display current date?

Question86: Given the following partial SAS log:
NOTE: SQL table SASHELP.CLASS was created line
Create table SASHELP.CLASS(bufsize=4096)
(
Name char(8);
Gender Char(1);
Age num;
Height num;
Weight num
);
Which SQL procedure statement generated this output?

Question87: The following SAS program is submitted:
%micro cols1;
name age;
%mend;
%macro cols2;
height weight
% mend
proc print data=sashelp.class;
<insert VAR statement here>
Run
Which VAR statement successfully completes the program and produces a report?

Question88: Given the following SAS data sets ONE and TWO:
ONE TWO
NUM COUNTRY NUM CITY
1 CANADA 3 BERLIN
2 FRANCE 5 TOKYO
3 GERMANY 4 BELGIUM
5 JAPAN
The following SAS program is submitted:
proc sql;
select country
from one
where not exists
(select *
from two
where one.num = two.num);
quit;
Which one of the following reports is generated?

Question89: The following SAS program is submitted.
filename sales ('external-file1' 'external-file2');
data new;
infile sales;
input date date9. company $ revenue;
run;
Which one of the following is the result of including the FILENAME statement in this program?

Question90: The following SAS program is submitted:
% let value = 9;
% let value2 = 5;
% let newval = %eval(&value / &value2);
Which one of the following is the resulting value of the macro variable NEWVAL?

Question91: The following SAS program is submitted:
% let first=yourname;
% let last=first;
% put &&&last;
What is written to the SAS Log?

Question92: Which PUT statements will be the log if the program is submitted at the beginning of a new SAS session?

Question93: The following SAS program is submitted:
data new (bufnp=4);
set old(bufno=4);
run;
Why are the BUFNO options used?

Question94: The following SAS program is submitted:
data new;
do i=1,2,3
nextfile=compress('March' || |);
infile abc filevar=nextfile
end=eof;
do until (eof);
input dept $sales;
end;
run;
What is the purpose of the FILEVAR=option on the INFILE statement?

Question95: Given the following SAS data set ONE:
ONE
CATEGORY AGE SALARY BONUS
M 28 200 20
M 25 100 10
M 28 300 10
M 33 300 30
F 18 100 50
F 25 200 10
F 35 400 50
The following SQL program is submitted:
proc sql;
create table two as
select distinct age
from one
where age < 33;
quit;
How many rows are written to the SAS data set TWO?

Question96: Which one of the following SAS integrity constraint types ensures that a specific set or range of values are the only values in a variable?

Question97: Which one of the following SAS SORT procedure options eliminates identical consecutive observations?

Question98: Given the SAS data set ONE:
ONE
REP COST
SMITH 200
SMITH 400
JONES 100
SMITH 600
JONES 100
The following SAS program is submitted:
Proc sql;
Select rep, avg(cost) as AVERAGE
From one
Group by rep
<insert SQL procedure clause here>
quit;
The following output is desired:

Which SQL procedure clause completes the program and generates the desired output?

Question99: Given the following SAS data set named WORK.INTERNAT:
WORK.INTERNAT
LOCATION SUM
USA 30
EUR 40
The following SAS program is submitted:
%let LOC = Usa;
proc sql;
select *
from internat
where location = "&Loc";
quit;
Which one of the following is the result when the above code is executed on the above data set?

Question100: Which SET statements option names a variable that contains the number of the observation to read during the current iteration of the DATA step?

Question101: Consider the following SAS log:
229 data sasuser.ranch sasuser.condo / view = sasuser.ranch;
230 set sasuser.houses;
231 if style = 'RANCH' then output sasuser.ranch;
232 else if style = 'CONDO' then output sasuser.condo;
233 run;
NOTE: DATA STEP view saved on file SASUSER.RANCH.
NOTE: A stored DATA STEP view cannot run under a different operating system.
234
235 proc print data = sasuser.condo;
ERROR: File SASUSER.CONDO.DATA does not exist.
236 run;
NOTE: The SAS System stopped processing this step because of errors.
Which one of the following explains why the PRINT procedure fails?

Question102: What is an advantage of using a hash object in a SAS DATA step?

Question103: The following SAS program is submitted:
%macro location;
data _null_;
call symput ('dept','sales');
run;
% let country=Germany;
% put_global_;
% mend;
% let company = ABC;
% location;
Which macro variables are written to the SAS log?

Question104: The following SAS program is submitted:
% let first = yourname;
% let last = first;
% put &&&last;
Which one of the following is the result in the log of the %PUT statement?

Question105: Given the following SAS data set ONE:
ONE
NUM VAR
1 A
2 B
3 C
Which one of the following SQL programs deletes the SAS data set ONE?

Question106: Which SAS produce can be used to report Page Size?

Question107: Which one of the following options displays the value of a macro variable in the SAS log?

Question108: The following SAS program is submitted:

What is the value of the macro variable Newval when the %PUT statement executes?

Question109: Which one of the following statements is true regarding a SAS DATA step view?

Question110: Given the following SAS data set ONE:
ONE
REP COST
SMITH 200
SMITH 400
JONES 100
SMITH 600
JONES 100
JONES 200
JONES 400
SMITH 800
JONES 100
JONES 300
The following SAS program is submitted:
proc sql;
select rep, avg(cost) as AVERAGE
from one
group by rep
having avg(cost) > (select avg(cost) from one);
quit;
Which one of the following reports is generated?

Question111: The following SAS program is submitted:
%macro test(var);
proc print data = sasuser.class;
where age > &var;
run;
%mend;
Which type of parameter is the macro variable VAR?

Question112: Given the SAS data sets:

The SAS program is submitted:

What output will be produced?

Question113: When reading a SAS data file, what does the NOBS=option on the SET statement represent?

Question114: Given a SAS data set with the following characteristics:
200 million observations

300 variables

Compressed

Resides on a network location

A SAS DATA Step program is written that will retrieve 20% of the data using a search based on a range of a character variable.
Which type of statement is the best choice to minimize computer resource utilization when subsetting this data?

Question115: Given the non-indexed SAS data set TEMP:
TEMP
X Y
- -
P 52
P 45
A 13
A 56
R 34
R 12
R 78
The following SAS program is submitted:
Proc print data=temp;
<insert BY statement here>
run;
Which BY statement completes the program, creates a listing report that is grouped by X and completes without errors?

Question116: The following SAS program is submitted:

The current system date macro variable is 30JUL2013.
Which output will be written to the log by the program?

Question117: The following SAS code is submitted:
%macro houses(dsn = houses,sub = RANCH);
data &dsn;
set sasuser.houses;
if style = "¬";
run;
% mend;
% houses(sub = SPLIT)
% houses(dsn = ranch)
% houses(sub = TWOSTORY)
Which one of the following is the value of the automatic macro variable SYSLAST?

Question118: Given the following SAS statement:
%let idcode = Prod567;
Which one of the following statements stores the value 567 in the macro variable CODENUM?

Question119: Which of the following is true about the COMPRESS=YES data set option?

Question120: What is the purpose of the SASFILE statement?

Question121: Given the data set shown on the left, the SAS program on the right is submitted:

Which statement is true regarding the WORK.MISSING data set?

Question122: The SAS data set ONE contains fifty million observations and contains the variable PRICE, QUANTITY, FIXED and VARIABLE. Which SAS program successfully creates three new variables TOTREV, TOTCOST and PROFIT and requires the least amount of CPU resources to be processed?

Question123: Which option forces the use of a specific index from a data set?

Question124: When is it appropriate to create indexes on a SAS data set for efficient processing?

Question125: The following SAS program is submitted:
% macro test(var);
% let jobs = BLACKSMITH WORDSMITH SWORDSMITH;
% let type = %index(&jobs,&var);
% mend;
% test(SMITH)
Which one of the following is the resulting value of the macro variable TYPE?

Question126: Which one of the following SAS programs displays the descriptor portion of each data set stored in the SASUSER library?

Question127: The following SAS program is submitted:
options yearcutoff = 1950;
%macro y2kopt(date);
%if &date >= 14610 %then %do;
options yearcutoff = 2000;
%end;
%else %do;
options yearcutoff = 1900;
%end;
%mend;
data _null_ ;
date = "01jan2000"d;
call symput("date",left(date));
run;
%y2kopt(&date)
The SAS date for January 1, 2000 is 14610 and the SAS system option for YEARCUTOFF is set to 1920 prior to submitting the above program.
Which one of the following is the value of YEARCUTOFF when the macro finishes execution?

Question128: This question will ask you to provide a segment of missing code.
Given the SAS data set WORK EXAM:
TotalScore
----------------
512
657
* 782
The following SAS program is submitted:

The following output is desired:
TotalScore
--------------
512
657
782
Which WHERE expression completes the program and generates the desired output?

Question129: The SAS data set WORK.CHECK has a variable named Id_Code in it. Which SQL statement would create an index on this variable?

Question130: Given the following SAS program:

What will be the output from the PRINT Procedure?

Question131: The following SAS program is submitted:
%let lib = %upcase(sasuser);
proc sql;
select nvar
from dictionary.tables
where libname = "&lib";
quit;
Given that several SAS data sets exist in the SASUSER library, which one of the following is generated as output?

Question132: Which of the following statement(s) in the DATASETS procedure alters the name of a SAS data set stored in a SAS data library?

Question133: Given the SAS data sets:

The following SAS DATA step is submitted:

What data values are stored in data set WORK.COMBINE?

Question134: Which one of the following is true regarding the KEEP statement?

Question135: Given the following scenario:
The SAS libraries LIBRARY and MYLIB are successfully defined in your current SAS session.

There is a SAS Data Set named WORK.GENDERS with a column called MF containing single

character values.
The SAS program on the left is submitted and the desired output is shown in the right.

Which statement is true?

Question136: The SAS data set TEMP has the following distribution of values for variable A:
A Frequency
1 500,000
2 500,000
6 7,000,000
8 3,000
Which one of the following SAS programs requires the least CPU time to be processed?

Question137: Which statement(s) in the DATASETS procedure alter(s) the name of a SAS data set stored in a SAS data library?

Question138: Given the SAS data sets ONE and TWO:

The following SAS program is submitted:
Data combine;
Merge one two;
By id;
Run;
Which SQL procedure program procedures the same results?

Question139: Which SAS integrity constraint type ensures that a specific set or range of values are the only values in a variable?

Question140: Which MACRO option is responsible for this partial SAS log?

Question141: Given the SAS data sets:

The following SAS program is submitted:

What data values are stored in data set WORK.COMBINE?

Question142: Which SAS System option(s) can aid in benchmarking?

Question143: The following SAS FORMAT procedure is submitted:
proc format lib = sasuser;
value tempc low < 0 = 'BELOW FREEZING'
0 < 5 = 'COLD'
5 < 10 = 'MILD'
10 < 15 = 'WARM'
15 high = 'HOT';
run;
How is the value 10 displayed when the format TEMPC is applied?

Question144: Which one of the following SAS procedures changes a permanent format of a variable stored in a SAS data set?

Question145: Given the following SAS data set ONE:
ONE
DIVISION SALES
A 1234
A 3654
B 5678
The following SAS program is submitted:
data _null_;
set one;
by division;
if first.division then
call symput('mfirst',sales);
if last.division then
call symput('mlast',sales);
run;
Which one of the following is the value of the macro variable MFIRST when the above program finishes execution?

Question146: Which one of the following is the purpose of the IDXNAME= data set option?

Question147: Which one of the following is the purpose of the REUSE= YES option in a compressed SAS data set?

Question148: This question will ask you to provide a segment of missing code.
The following SAS program submitted:

Which segment of code will successfully run an in-line view?

Question149: In the data step merge, the BY variables in all data sets must have the same:

Question150: SIMULATION
The question will ask you to provide a segment of missing code.
The following SAS program is submitted:

The text box above, complete the %PUT statement to produce the following log output:

Case is ignored and standard SAS syntax rules apply.

Question151: The following SAS program is submitted:
% macro check(num=4);
% let result=%eval(&nm gt 5);
% put result is &result;
% mend;
% check (num=10)
What is written to the SAS log?

Question152: Given the data sets shown on the left, the SAS program shown on the right is submitted.

What will be output by the program?

Question153: The following SAS program is submitted:

The purpose of FILEVAR = option on the INFILE statement is to name the variable next, whose value:

Question154: The following SAS program is submitted:
% let value = .5;
% let add = 5;
% let newval = %eval(&value + &add);
Which one of the following is the resulting value of the macro variable NEWVAL?

Question155: The following SAS program is submitted:
%let name = Patel's Restaurant;
Which one of the following statements avoids problems associated with the unbalanced quotation mark?

Question156: Which one of the following options is available for SAS macro debugging?

Question157: Given the following SAS data set ONE:
ONE
REP AREA COST
SMITH NORTH 100
SMITH SOUTH 200
JONES EAST 100
SMITH NORTH 300
JONES WEST 100
JONES NORTH 200
JONES NORTH 400
SMITH NORTH 400
JONES WEST 100
JONES WEST 300
The following SAS program is submitted:
proc sql;
select rep, area, count(*) as TOTAL
from one
group by rep, area;
quit;
Which one of the following reports is generated?

Question158: The following SAS program is submitted:
proc contents data = testdata.one;
run;
Which SQL procedure program produces similar information about the column attributes of the dataset TESTDATA.ONE?

Question159: The following SAS program is submitted:
data temp:
array points { 2,3 } (10,15,20,25,30,35);
run;
What impact does the ARRAY statement have in the program Data vector (PDV)?

Question160: The following SAS program is submitted:

What is written to the SAS log?

Question161: CORRECT TEXT
The following SAS program is submitted:
% macro check(num=4);
% let result=%sysevalf(&num+0.5);
% put result is &result;
% mend;
% check(num=10)
What is the written to the SAS log?

Question162: Given the SAS data sets:

A SAS program is submitted and the following is written to SAS to:

What would allow the program to successfully execute without errors?

Question163: Assume today is Tuesday, July 23, 2002. Which one of the following statements submitted at the beginning of a SAS session assigns the value Tuesday, July 23, 2002 to the macro variable START?

Question164: Which one of the following should be avoided when creating and using an SQL procedure view?

Question165: The SAS data set ONE contains the variables X,Y,Z and W.
The following SAS program is submitted:
Proc transpose data =one
Out=trans
Name=new;
By x;
var y;
run;
What are the names of all of the columns created by the TRANSPOSE procedure?

Question166: The following SAS program is submitted:
proc sort data = sales tagsort;
by month year;
run;
Which of the following resource(s) is the TAGSORT option reducing?

Question167: Given the following SAS data set SASUSER.HIGHWAY:
SASUSER.HIGHWAY
STEERING SEATBELT SPEED STATUS COUNT
absent no 0-29 serious 31
absent no 0-29 not 1419
absent no 30-49 serious 191
absent no 30-49 not 2004
absent no 50+ serious 216
The following SAS program is submitted:
%macro highway;
proc sql noprint;
select count(distinct status)
into :numgrp
from sasuser.highway;
%let numgrp = &numgrp;
select distinct status
into :group1-:group&numgrp
from sasuser.highway;
quit;
%do i = 1 %to &numgrp;
proc print data = sasuser.highway;
where status = "&&group&i" ;
run;
% end;
% mend;
% highway
How many reports are produced by the above program?

Question168: Given has SAS dataset ONE:

The following SAS program is submitted:

Proc sql;
<insert SQL clause here>
from one;
quit;
The following output is desired:
Which SQL procedure clause completes the program and generates the desired output?

Question169: Given the SAS data set ONE:
ONE
DIVISION SALES
A 1234
A 3654
B 5678
The following SAS program is submitted:
Data_null_;
Set one;
By divition;
If first.division then
Do;
%let mfirst=sales;
end;
run;
What is the value of the macro variable MFRIST when the program finishes execution?

Question170: The SAS data set ONE has a variable X on which an index has been created. The data sets ONE and THREE are sorted by X.
Which one of the following SAS programs uses the index to select observations from the data set ONE?

Question171: The following SAS program is submitted:
%macro execute;
<insert statement here>
proc print data = sasuser.houses;
run;
%end;
%mend;
Which of the following completes the above program so that it executes on Tuesday?

Question172: Given the SAS data sets ONE and TWO:

The following SAS program is submitted:
Proc sql;
Select two.*,budget from one <insert JOIN operator here> two on one.year=two.year, Quit;
The following output is desired:

Which JOIN operator completes the program and generates the desired output?

Question173: Given the following SAS data set ONE:
ONE
JOB LEVEL SALARY
ACC 2 300
SEC 1 100
SEC 2 200
MGR 3 700
ACC 1 .
ACC 3 .
MGR 2 400
The following SAS data set TWO is created:
TWO
JOB LEVEL BONUS
ACC 2 30
MGR 3 70
MGR 2 40
Which one of the following SAS programs creates data set TWO?

Question174: The following SAS program is submitted:
%let dept=prod;
%let prod=merchandise;
The following message is written to the SAS log:
The value is "merchandise"
Which SAS System option writes this message to the SAS log?

Question175: Which SQL procedure program deletes rows from the data set CLASS?

Question176: The following SAS program is submitted:
%let lib=%upcase(sauser); proc sql;
select nvar form dictionary.tables where libname='&lib"; quit;
Several SAS data sets exist in the SAUSER library.
What is generated as output?

Question177: Given the following SAS data sets ONE and TWO:
ONE TWO
YEAR QTR BUDGET YEAR QTR SALES
2001 3 500 2001 4 300
2001 4 400 2002 1 600
2002 1 700
The following SAS program is submitted:
proc sql;
select one.*, sales
from one, two;
quit;
Which one of the following reports is generated?

Question178: Which DICTIONARY table provides information on all the tables containing a variable named LASTNAME?

Question179: Given the following SAS data set ONE:
ONE
CATEGORY AGE SALARY BONUS
----
M 28 200 .
M 25 100 10
F 18 100 50
F 25 200 10
The following SAS program is submitted:
proc sql;
create table two as
select category, salary + bonus as EARNINGS
from one; quit;
Which one of the following represents the data values stored in the data set TWO?

Question180: This question will ask you to provide a segment of missing code.
Given the SAS data set SASUSER.HIGHWAY:

The following SAS program is submitted:

Which SQL clause stores the text 0-29, 30-49, 60+ in the macro variable GROUPS?

Question181: At the start of a new SAS session; the following program is submitted:
%macro one;
data _null_;
call symput('proc','measn);
run;
proc &proc data=sashelp.class;
run;
% mend;
% one()
What is the result?